package traceMyItems.business;

import java.util.*;
import java.util.logging.Logger;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class ItemStatus {
	private static final Logger log = Logger.getLogger(ItemStatus.class.getName());
	
	@Persistent
	private Date date;
	@Persistent
	private User responsible;
	@Persistent
	private StatusType statusType;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key=null;
	
	
	public void createKey() {
        //this.key = KeyFactory.createKey(User.class.getSimpleName(), strUsername+":"+strEmail);
		///TODO: Aun queda crear criterio de creacion de clave para esta clase
		this.key = null;
    }
	
	public Key getKey()
	{
		return key;
	}
	
	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @return the responsible
	 */
	public User getResponsible() {
		return responsible;
	}

	/**
	 * @param responsible the responsible to set
	 */
	public void setResponsible(User responsible) {
		this.responsible = responsible;
	}

	/**
	 * @return the statusType
	 */
	public StatusType getStatusType() {
		return statusType;
	}

	/**
	 * @param statusType the statusType to set
	 */
	public void setStatusType(StatusType statusType) {
		this.statusType = statusType;
	}
}
